package com.star.mall.mq.producer.impl;

import com.star.mall.mq.producer.JmsProducer;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.stereotype.Service;

@Slf4j
@Service("empty")
@ConditionalOnProperty(
        prefix = "jms",
        name = {"mode"},
        havingValue = "empty",
        matchIfMissing = true
)
public class EmptyProducer implements JmsProducer {

    @Override
    public void send2Queue(Object object, String queueName) {
        log.info("No queue to send message.");
    }

}
